﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Diplomova_prace
{
    public static class GlobalMethod
    {
        public static bool FileInUse(string destination)
        {
            FileStream fs = null;
            try
            {
                if (File.Exists(destination))
                    fs = File.Open(destination, FileMode.Open);
            }
            catch 
            {
                return true;
            }
            finally
            {
                if (fs != null)
                    fs.Close();
            }
            return false;
        }
    }
}
